﻿using System.Collections.Generic;
using System;
using System.Text;

namespace RbmlVisualizer.Data.Blocks
{
    public class ClassifierBehavior : IMultiplicity
    {
        public ClassifierBehavior()
        {
            Paramaters = new List<Tuple<string, string>>();
            ReturnType = string.Empty;
        }
        public string Name { get; set; }
        public string ReturnType { get; set; }
        public List<Tuple<string, string>> Paramaters { get; set; }
        public Multiplicity Multiplicity { get; set; }


        public override string ToString()
        {
            var builder = new StringBuilder();
            builder.Append(ReturnType);
            builder.Append(" ");
            builder.Append(Name);
            builder.Append("(");
            foreach (var paramater in Paramaters)
            {
                builder.Append(paramater.Item1);
                builder.Append(" ");
                builder.Append(paramater.Item2);
                builder.Append(",");
            }
            builder.Append(")");
            builder.Append(Multiplicity);
            return builder.ToString();
        }
    }
}
